]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
layout: Don't query the monitor size twice
authorAdel Gadllah <adel.gadllah@gmail.com>
Mon, 17 Feb 2014 12:42:20 +0000 (13:42 +0100)
committerAdel Gadllah <adel.gadllah@gmail.com>
Mon, 17 Feb 2014 12:42:20 +0000 (13:42 +0100)
js/ui/layout.js

index 3f661479e1b16500fb52ac427a04bf13a4a5be5e..4111c00937d1b9055953f2040e973722676b23be 100644 (file)
@@ -497,8 +497,8 @@ const LayoutManager = new Lang.Class({
             St.ThemeContext.get_for_stage(global.stage).scale_factor = 1;
             return;
         }
-        let dpi_x = primary.width / (global.gdk_screen.get_monitor_width_mm(this.primaryIndex) / 25.4);
-        let dpi_y = primary.height / (global.gdk_screen.get_monitor_height_mm(this.primaryIndex) / 25.4);
+        let dpi_x = primary.width / (width_mm / 25.4);
+        let dpi_y = primary.height / (height_mm / 25.4);
         if (dpi_x > HIGH_DPI_LIMIT && dpi_y > HIGH_DPI_LIMIT)
             St.ThemeContext.get_for_stage(global.stage).scale_factor = 2;
         else